package com.shp.service;

import com.shp.pojo.Purse;
import com.shp.pojo.Recharge;
import com.shp.pojo.Withdrawals;

import java.util.List;

/**
 * Description:
 *
 * @author zwl
 * @version 1.0
 * @date 2020/2/28 13:21
 */
public interface PurseService {

    /**
     * 根据用户的id，查询用户的钱包
     * @param userId 用户id
     * @return Purse
     */
    public Purse getPurseByUserId(Integer userId);

    /**
     * 根据Recharge，修改用户的Recharge
     * @param recharge1 Recharge
     * @return true修改成功，false修改失败
     */
    public boolean insertRecharge(Recharge recharge1);

    /**
     * 根据Withdrawals，修改用户的Withdrawals
     * @param withdrawals1 Withdrawals
     * @return true修改成功，false修改失败
     */
    public boolean insertWithdrawals(Withdrawals withdrawals1);

    /**
     * 查询所有的钱包记录，配合分页
     * @return  List<Purse>
     */
    public List<Purse> getAll();

    /**
     * 修改钱包的信息
     * @param purse 钱包信息
     * @return 修改成功返回true；否则返回false
     */
    public boolean update(Purse purse);

    /**
     * 根据钱包id获取钱包的信息
     * @param id 钱包id
     * @return Purse
     */
    public Purse getPurseById(Integer id);

    /**
     * 根据邮箱或者状态查询钱包
     * @param email
     * @param status
     * @return List<Purse>
     */
    public List<Purse> getSelectedPurse(String email, Integer status);

    /**
     * 获取所有的提现记录，便于分页
     * @return List<Withdrawals>
     */
    public List<Withdrawals> getWithdrawalsAll();

    /**
     * 审核
     * @param withdrawals com.shp.pojo.Withdrawals
     * @return true审核成功；否则审核失败
     */
    public boolean withdrawalsPass(Withdrawals withdrawals);

    /**
     * 提现选择分页
     * @param email 用户邮箱
     * @param status 用户提现的状态
     * @return List<Withdrawals>
     */
    public List<Withdrawals> getSelectedWithdrawals(String email, Byte status);

    /**
     * 批量删除提现记录
     * @param ids id列表
     * @return true代表删除成功；否则删除失败
     */
    public boolean deleteWithdrawalsBatch(Integer[] ids);

    /**
     * 获取所有充值记录，便于分页
     * @return  List<Recharge>
     */
    public List<Recharge> getRechargeAll();

    /**
     * 充值审核
     * @param recharge com.shp.pojo.Recharge
     * @return true审核成功；否则审核失败
     */
    public boolean rechargePass(Recharge recharge);

    /**
     * 充值选择分页
     * @param email 用户email
     * @param status 审核状态
     * @return List<Recharge>
     */
    public List<Recharge> getSelectedRecharge(String email, Byte status);

    /**
     * 批量删除充值记录
     * @param ids id列表
     * @return true代表删除成功；否则代表删除失败
     */
    public boolean deleteRechargeBatch(Integer[] ids);

    /**
     * 根据充值id，获取充值记录
     * @param orderId 充值id
     * @return Recharge
     */
    public Recharge getRecharge(String orderId);
}
